<template>
  <div>
    <tablePaging :tableItem="tableItem" :operationItem="operationItem"/>
  </div>
</template>

<script setup>
import tablePaging from '@/views/common/component/table-paging'
import { onMounted } from 'vue'
import { useRouter } from 'vue-router'
import {
  tableItem,
  operationItem
} from './const.js'
const router = useRouter()
const { proxy } = getCurrentInstance();
function initTableItem() {
  let btnArray = tableItem.btnArray
  let viewMenu = btnArray.find(item => item.code == 'view')
  viewMenu.handle = goView
}
function goView(row) {
  router.push({
    path: '/modules/config/param/component/list',
    query: {id:row.id, code: row.code,name:row.name}
  })
  sessionStorage.setItem('code', row.code)
  sessionStorage.setItem('paramId', row.id)
}

onMounted(() => {
  initTableItem()
})

</script>
<style></style>
